#include <openssl/evp.h>
#include <iostream>
#include <openssl/ec.h>
using namespace std;
class XECDH {
    private:


    public:
        bool CreateKey();

};

bool XECDH::CreateKey()
{
    auto ptcx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, nullptr);
    int re = EVP_PKEY_paramgen_init(ptcx);
    
    EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ptcx, NID_sm2);
    
    EVP_PKEY *pkey;
    EVP_PKEY_paramgen(ptcx, &pkey);


}
